import { RouteRecordRaw } from 'vue-router'
import Layout from '../layout/Layout.vue'

const routes:RouteRecordRaw[] = [
    {
        path : '/account',
        component : Layout,
        meta : {title : '我的主页', hidden : true},
        children : [
            {
                path : '',
                component : () => import('@/pages/account/index.vue')
            }
        ]
    },

    {
        path : '/financialAnalysis',
        component : Layout,
        meta : {title : '财务分析'},
        children : [
            {
                path : '',
                component : () => import('@/pages/financialAnalysis/index.vue')
            }
        ]
    },

    {
        path : '/strategy',
        component : Layout,
        meta : {title : '策略研究'},
        children : [
            {
                path : '',
                meta : {title : '策略库', keepAlive : false},
                component : () => import('@/pages/strategy/strategyLib/index.vue')
            },
            {
                path : 'detail/:id',
                meta : {title : '策略详情', hidden : true},
                component : () => import('@/pages/strategy/strategyLib/detail/index.vue')
            },

            {
                path : 'backTest/:id',
                meta : {title : '回测列表', hidden : true},
                component : () => import('@/pages/strategy/backTest/index.vue')
            },

            {
                path : 'backTest/result/:id',
                meta : {title : '回测结果', hidden : true, full : true},
                component : () => import('@/pages/strategy/backTest/result.vue')
            },

            {
                path : 'combinationBackTest',
                meta : {title : '组合回测'},
                component : () => import('@/pages/strategy/combinationBackTest/index.vue')
            },

            {
                path : 'combinationBackTest/:id',
                meta : {title : '组合回测详情', hidden : true, full : true},
                component : () => import('@/pages/strategy/combinationBackTest/detail.vue')
            },

            {
                path : 'follow',
                meta : {title : '策略跟踪'},
                component : () => import('@/pages/strategy/follow/index.vue')
            },

            {
                path : 'follow/:id',
                meta : {title : '策略跟踪详情', hidden : true, full : true},
                component : () => import('@/pages/strategy/follow/detail.vue')
            },

            {
                path : 'follow/setting/:id',
                meta : {title : '策略跟踪设置', hidden : true, full : false},
                component : () => import('@/pages/strategy/follow/setting.vue')
            },

            {
                path : 'indexSignal',
                meta : {title : '指数信号', keepAlive : false},
                component : () => import('@/pages/strategy/indexSignal/index.vue')
            },

            {
                path : 'stockSelector',
                meta : {title : '选股器', keepAlive : false},
                component : () => import('@/pages/strategy/stockSelector/index.vue')
            },

        ]
    },

    {
        path : '/stockBoard',
        component : Layout,
        meta : {title : '因子看板', full : true},
        children : [
            {
                path : '',
                component : () => import('@/pages/stockBoard/index.vue')
            }
        ]
    },

    {
        path : '/industryAnalysis',
        component : Layout,
        meta : {title : '行业分析'},
        children : [
            {
                path : '',
                component : () => import('@/pages/industryAnalysis/index.vue')
            }
        ]
    },

    {
        path : '/macroAnalysis',
        component : Layout,
        meta : {title : '宏观分析', full : true},
        children : [
            {
                path : '',
                component : () => import('@/pages/macroAnalysis/index.vue')
            }
        ]
    },

    {
        path : '/account',
        component : Layout,
        meta : {title : '个人中心', hidden : true},
        children : [
            {
                path : '',
                component : () => import('@/pages/account/index.vue')
            }
        ]
    }
]

export default routes